package com.footballclub.model;

public class Player {
    private String playerId;
    private String playerName;
    private String position; // 新增位置字段
    private int salary;

    // 完善构造方法，包含position参数
    public Player(String playerId, String playerName, String position, int salary) {
        this.playerId = playerId;
        this.playerName = playerName;
        this.position = position;
        this.salary = salary;
    }

    // 新增position的getter和setter
    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    // 原有getter和setter保持不变
    public String getPlayerId() { return playerId; }
    public void setPlayerId(String playerId) { this.playerId = playerId; }
    public String getPlayerName() { return playerName; }
    public void setPlayerName(String playerName) { this.playerName = playerName; }
    public int getSalary() { return salary; }
    public void setSalary(int salary) { this.salary = salary; }

    public String toString() {
        return "ID: " + playerId + ", 姓名: " + playerName + ", 位置: " + position + ", 薪水: " + salary;
    }
}
